import request from '/@/utils/request';

export function listDate(query?: Object) {
	return request({
		url: '/admin/dateCombo/listDate',
		method: 'get',
		params: query,
	});
}

export function delObj(ids?: object) {
	return request({
		url: '/admin/dateCombo',
		method: 'delete',
		data: ids,
	});
}

export function getObj(id: string) {
	return request({
		url: '/admin/dateCombo/details/' + id,
		method: 'get',
	});
}

export const addObj = (obj: Object) => {
	return request({
		url: '/admin/dateCombo',
		method: 'post',
		data: obj,
	});
};

export const putObj = (obj: Object) => {
	return request({
		url: '/admin/dateCombo',
		method: 'put',
		data: obj,
	});
};

export const copyCombo = (id: string, params: any) => {
	return request({
		url: `/admin/dateCombo/copyCombo/${id}`,
		method: 'get',
		params,
	});
};
